﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class fd : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        ((MasterPage)this.Master).mainCategory = "FIXED";

        if (ddlTenor.SelectedItem.Text != "Select a tenor")
        {
            ddlAmount.Visible = true;

            if (ddlAmount.SelectedItem.Text != "Select a deposit amount")
            {
                lbRate.Visible = true;

                if (ddlTenor.SelectedItem.Text == "1 Month") 
                { 
                   if(ddlAmount.SelectedItem.Text == "$500")
                       lbRate.Text = "Sorry, minimium deposit tenor for $500 is 12 months";
                   
                   else if (ddlAmount.SelectedItem.Text == "$600 - $1000")
                       lbRate.Text = "Sorry, minimium deposit tenor for $600 - $1000 is 6 months";

                   else if (ddlAmount.SelectedItem.Text == "$1100 - $1500")
                       lbRate.Text = "0.05";

                   else if (ddlAmount.SelectedItem.Text == "$1600 - $2000")
                       lbRate.Text = "0.05";

                   else if (ddlAmount.SelectedItem.Text == "$2100 - $2500")
                       lbRate.Text = "0.10";

                   else if (ddlAmount.SelectedItem.Text == "$2600 - $3000")
                       lbRate.Text = "0.10";

                   else if (ddlAmount.SelectedItem.Text == "Above $3000")
                       lbRate.Text = "0.15";

                }

                else if (ddlTenor.SelectedItem.Text == "2 Months")
                {
                    if (ddlAmount.SelectedItem.Text == "$500")
                        lbRate.Text = "Sorry, minimium deposit tenor for $500 is 12 months";

                    else if (ddlAmount.SelectedItem.Text == "$600 - $1000")
                        lbRate.Text = "Sorry, minimium deposit tenor for $600 - $1000 is 6 months";

                    else if (ddlAmount.SelectedItem.Text == "$1100 - $1500")
                        lbRate.Text = "0.10";

                    else if (ddlAmount.SelectedItem.Text == "$1600 - $2000")
                        lbRate.Text = "0.10";

                    else if (ddlAmount.SelectedItem.Text == "$2100 - $2500")
                        lbRate.Text = "0.15";

                    else if (ddlAmount.SelectedItem.Text == "$2600 - $3000")
                        lbRate.Text = "0.15";

                    else if (ddlAmount.SelectedItem.Text == "Above $3000")
                        lbRate.Text = "0.20";

                }

                else if (ddlTenor.SelectedItem.Text == "3 Months")
                {
                    if (ddlAmount.SelectedItem.Text == "$500")
                        lbRate.Text = "Sorry, minimium deposit tenor for $500 is 12 months";

                    else if (ddlAmount.SelectedItem.Text == "$600 - $1000")
                        lbRate.Text = "Sorry, minimium deposit tenor for $600 - $1000 is 6 months";

                    else if (ddlAmount.SelectedItem.Text == "$1100 - $1500")
                        lbRate.Text = "0.15";

                    else if (ddlAmount.SelectedItem.Text == "$1600 - $2000")
                        lbRate.Text = "0.15";

                    else if (ddlAmount.SelectedItem.Text == "$2100 - $2500")
                        lbRate.Text = "0.20";

                    else if (ddlAmount.SelectedItem.Text == "$2600 - $3000")
                        lbRate.Text = "0.20";

                    else if (ddlAmount.SelectedItem.Text == "Above $3000")
                        lbRate.Text = "0.25";

                }

                else if (ddlTenor.SelectedItem.Text == "6 Months")
                {
                    if (ddlAmount.SelectedItem.Text == "$500")
                        lbRate.Text = "Sorry, minimium deposit tenor for $500 is 12 months";

                    else if (ddlAmount.SelectedItem.Text == "$600 - $1000")
                        lbRate.Text = "0.05";

                    else if (ddlAmount.SelectedItem.Text == "$1100 - $1500")
                        lbRate.Text = "0.20";

                    else if (ddlAmount.SelectedItem.Text == "$1600 - $2000")
                        lbRate.Text = "0.20";

                    else if (ddlAmount.SelectedItem.Text == "$2100 - $2500")
                        lbRate.Text = "0.25";

                    else if (ddlAmount.SelectedItem.Text == "$2600 - $3000")
                        lbRate.Text = "0.25";

                    else if (ddlAmount.SelectedItem.Text == "Above $3000")
                        lbRate.Text = "0.30";

                }

                else if (ddlTenor.SelectedItem.Text == "12 Months")
                {
                    if (ddlAmount.SelectedItem.Text == "$500")
                        lbRate.Text = "0.05";

                    else if (ddlAmount.SelectedItem.Text == "$600 - $1000")
                        lbRate.Text = "0.10";

                    else if (ddlAmount.SelectedItem.Text == "$1100 - $1500")
                        lbRate.Text = "0.25";

                    else if (ddlAmount.SelectedItem.Text == "$1600 - $2000")
                        lbRate.Text = "0.25";

                    else if (ddlAmount.SelectedItem.Text == "$2100 - $2500")
                        lbRate.Text = "0.30";

                    else if (ddlAmount.SelectedItem.Text == "$2600 - $3000")
                        lbRate.Text = "0.30";

                    else if (ddlAmount.SelectedItem.Text == "Above $3000")
                        lbRate.Text = "0.35";

                }

                else if (ddlTenor.SelectedItem.Text == "24 Months")
                {
                    if (ddlAmount.SelectedItem.Text == "$500")
                        lbRate.Text = "0.10";

                    else if (ddlAmount.SelectedItem.Text == "$600 - $1000")
                        lbRate.Text = "0.15";

                    else if (ddlAmount.SelectedItem.Text == "$1100 - $1500")
                        lbRate.Text = "0.30";

                    else if (ddlAmount.SelectedItem.Text == "$1600 - $2000")
                        lbRate.Text = "0.30";

                    else if (ddlAmount.SelectedItem.Text == "$2100 - $2500")
                        lbRate.Text = "0.35";

                    else if (ddlAmount.SelectedItem.Text == "$2600 - $3000")
                        lbRate.Text = "0.35";

                    else if (ddlAmount.SelectedItem.Text == "Above $3000")
                        lbRate.Text = "0.40";

                }

                else 
                {
                    if (ddlAmount.SelectedItem.Text == "$500")
                        lbRate.Text = "0.15";

                    else if (ddlAmount.SelectedItem.Text == "$600 - $1000")
                        lbRate.Text = "0.20";

                    else if (ddlAmount.SelectedItem.Text == "$1100 - $1500")
                        lbRate.Text = "0.35";

                    else if (ddlAmount.SelectedItem.Text == "$1600 - $2000")
                        lbRate.Text = "0.35";

                    else if (ddlAmount.SelectedItem.Text == "$2100 - $2500")
                        lbRate.Text = "0.40";

                    else if (ddlAmount.SelectedItem.Text == "$2600 - $3000")
                        lbRate.Text = "0.40";

                    else if (ddlAmount.SelectedItem.Text == "Above $3000")
                        lbRate.Text = "0.45";

                }

            }
        }
    }
    protected void btnReset_Click(object sender, EventArgs e)
    {
        Response.Redirect("fd.aspx");
    }
}